//
//  SearchTitleCollectionReusableView.m
//  OurTourism
//
//  Created by dllo on 15/11/30.
//  Copyright © 2015年 Devil_Coming. All rights reserved.
//

#import "SearchTitleCollectionReusableView.h"

@interface SearchTitleCollectionReusableView ()
@property (nonatomic, strong)UILabel *titleLabel;
@end

@implementation SearchTitleCollectionReusableView
#pragma mark - 初始化
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        self.titleLabel = [[UILabel alloc]init];
        self.titleLabel.textAlignment = NSTextAlignmentCenter;
        [self addSubview:self.titleLabel];
        self.titleLabel.textColor = [UIColor colorWithRed:0.23 green:0.67 blue:0.73 alpha:1];
        self.titleLabel.font = [UIFont fontWithName:@"Arial-Bold" size:16];
        
        
    }
    return self;
}

- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
  
    //标题
    self.titleLabel.frame = CGRectMake(0, 0, layoutAttributes.size.width, layoutAttributes.size.height);
    
}

- (void)setModel:(YBDestinationModel *)model
{
    if (_model != model) {
       
        _model = model;
    }
    self.titleLabel.text = model.title;
}

@end
